package generics.practices;

import typeinfo.pets.*;

class Generics1<T>{
	T t;
	void f(T t){
		this.t = t;
	}
}

class Generics2<T>{
	T t;
	T f(){
		return t;
	}
}

public class Practice28 {

	public static <T> void f(Generics1<? super T> g, T t){
		g.f(t);
	}
	
	public static <T> T f2(Generics2<? extends T> g){
		return g.f();
	}
	
	public static void main(String[] args) {
		f(new Generics1<Pet>(), new Pet("aa"));
		f2(new Generics2<Pet>());
	}
}
